<!DOCTYPE html>
<html>
<head>
    <style>
        body { margin: 0; width:100%%; height:100%%; background-color:#000; }
        html { width:100%%; height:100%%; background-color:#000; }
        .container iframe, .container object, .container embed { position: absolute; top: 0; left: 0; width: 100%% !important; height: 100%% !important; }
        video::-webkit-media-controls { display: none !important }
    </style>
</head>
<body>
    <div class="container">
        <video id="video" type="video/mp4" preload="auto" src="%@" webkit-playsinline></video>
    </div>
    <script>
        var video = document.getElementsByTagName('video')[0];
        video.addEventListener("playing", onPlaybackStart, false);
        video.addEventListener("ended", onPlaybackEnd, false);
        
        function onPlaybackStart() {
            window.location.href = 'embed://onPlayback?data=';
        }
    
        function onPlaybackEnd() {
            video.currentTime = 0;
            video.play();
        }
    
        function play() {
            video.play();
        }
    
        function pause() {
            video.pause();
        }

        video.play();
    </script>
</body>
</html>
